// JavaScript Document
function _g(id){return document.getElementById(id)};
function gL(x){var l=0;while(x){l+=x.offsetLeft;x=x.offsetParent;}return l};
function gT(x){var t=0;while(x){t+=x.offsetTop;x=x.offsetParent;}return t};

function xmlHttp(Url,xmlBack){	
var xObj=null;
try{
	xObj=new ActiveXObject("MSXML2.XMLHTTP")
	}catch(e)
	{
	try
	{
		xObj=new ActiveXObject("Microsoft.XMLHTTP")
	}catch(e2){
		try{
		xObj=new XMLHttpRequest()}catch(e){}}};
		with(xObj){
			open("get",Url, true);
			onreadystatechange=function(){
				if(readyState==4&&status==200)
				{
					xmlBack(responseText)
				}
				else{
				     xmlBack("<img src='images/loading.gif'>")
				}
				};send(null)}};

if(document.all)
window.attachEvent("onload",onchange);
else
window.addEventListener("load",onchange,false);
function onchange(){
    var temp1 = document.getElementById("tags").getElementsByTagName("a");
    for(var i = 0; i<temp1.length;i++){
        temp1[i].onclick = (function(num){
            return function(){
				var temp3 = document.getElementById("tags").getElementsByTagName("a");
	            var temp4=new Array(321,226,163,229,391,91,394,224,324,317);
	            for(var j = 0 ; j < temp3.length; j ++)
	            {
		            if(num == j)
		            {
			           temp3[j].className="hhtc";
			           xmlHttp("cityhotel_ajax.asp?cityid="+temp4[j],function(e){_g("hotelcontent").innerHTML=e});	 
		            }
		            else
		            {
			            temp3[j].className="";
		            }	
	            }
            }
        })(i);
    }
}

function ShowAir(cityid,obj){
	var ShowObj=GetObj('airp');
	ShowObj.style.position='absolute';
	ShowObj.style.top =gT(obj)+21;
	ShowObj.style.left =gL(obj)-0;
	ShowObj.style.display = "block";
	xmlHttp("cityair_ajax.asp?cityid="+cityid,function(e){_g('aircontent').innerHTML=e});
}

function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else if(document.layers){
		return eval("document.layers['" + objName +"']");
	}else{
		return eval('document.all.' + objName);
	}
}